package com.mustafaiev.tair.autobase.dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.mustafaiev.tair.autobase.garage.Car;

/**
 * Data Access Object for autobase cars. Class provides adding car into
 * database, reading car information, deleting car and update car information
 * 
 * @author Tair Mustafaiev
 * 
 */
public interface CarDao {

	/**
	 * @param car
	 * @return int
	 * @throws SQLException
	 */
	int addCar(Car car) throws SQLException;

	/**
	 * @param car
	 * @return {@link ResultSet}
	 * @throws SQLException
	 */
	ResultSet getCar(Car car) throws SQLException;

	/**
	 * @return {@link ResultSet}
	 * @throws SQLException
	 */
	ResultSet getCarsList() throws SQLException;

	/**
	 * @param car
	 * @return int
	 * @throws SQLException
	 */
	int deleteCar(Car car) throws SQLException;

	/**
	 * @param car
	 * @return
	 * @throws SQLException
	 */
	int updateCarInfo(Car car) throws SQLException;

}
